<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>代理商品 - 新增商品</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 新增商品 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 代理商品 <i class="icon-angle-right"></i> </li>
          <li> <a href="/agent/goodslist">商品列表</a> <i class="icon-angle-right"></i> </li>
          <li>新增商品</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN SAMPLE FORM PORTLET-->
        <form class="form-horizontal" method="post" onSubmit="return chkfrm();" action="/agent/savegoods" role="form">
          <input type="hidden" name="act" value="add">
          <div class="tabbable tabbable-custom boxless">
            <ul class="nav nav-tabs">
              <li class="active"><a href="#tab_0" data-toggle="tab">基本信息</a></li>              
            </ul>
            <div class="tab-content"> 
              <!--Tab0-->
              <div class="tab-pane active" id="tab_0">
                <div class="portlet box blue ">
                  <div class="portlet-title">
                    <div class="caption"> <i class="icon-reorder"></i> 基本信息 </div>
                  </div>
                  <div class="portlet-body form">
                    <div class="form-body">
                      <div class="form-group">
                        <label  class="col-md-2 control-label">商品名称<span class="required">*</span></label>
                        <div class="col-md-6">                       
                          <input type="text" name="goods_name" id="_goods_name" maxlength="40" class="form-control"  placeholder="请输入商品名称">
                          <span class="help-block">40个汉字以内</span> </div>
                      </div>                      
                      <hr>                      
                      <div class="form-group">
                        <label  class="col-md-2 control-label">市场价格<span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" name="market_price" id="market_price" maxlength="10" class="form-control" value="0.00">
                          <span class="help-block">例如：10.00</span> </div>
                      </div>
                      <hr>
                      <div class="form-group memberprice">
                        <label  class="col-md-2 control-label">县代价格<span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" name="price_2" id="price_2" maxlength="10" class="form-control" value="0.00">
                          <span class="help-block">例如：10.00</span> </div>
                      </div>
                      <div class="form-group memberprice">
                        <label  class="col-md-2 control-label">市代价格<span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" name="price_3" id="price_3" maxlength="10" class="form-control" value="0.00">
                          <span class="help-block">例如：10.00</span> </div>
                      </div>
                      <div class="form-group memberprice">
                        <label  class="col-md-2 control-label">省代价格<span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" name="price_4" id="price_4" maxlength="10" class="form-control" value="0.00">
                          <span class="help-block">例如：10.00</span> </div>
                      </div>
                      <hr>
                      <div class="form-group memberprice">
                        <label  class="col-md-2 control-label">县代级别推荐奖<span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" name="recommend_2" id="recommend_2" maxlength="10" class="form-control" value="0.00">
                          <span class="help-block">例如：10.00</span> </div>
                      </div>
                      <div class="form-group memberprice">
                        <label  class="col-md-2 control-label">市代级别推荐奖<span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" name="recommend_3" id="recommend_3" maxlength="10" class="form-control" value="0.00">
                          <span class="help-block">例如：10.00</span> </div>
                      </div>
                      <div class="form-group memberprice">
                        <label  class="col-md-2 control-label">省代级别推荐奖<span class="required">*</span></label>
                        <div class="col-md-6">
                          <input type="text" name="recommend_4" id="recommend_4" maxlength="10" class="form-control" value="0.00">
                          <span class="help-block">例如：10.00</span> </div>
                      </div>
                    </div>
                    <div class="form-actions fluid">
                      <div class="col-md-offset-2 col-md-9">
                        <button type="submit" class="btn blue">提交</button>
                      </div>
                    </div>
                  </div>
                </div>
              </div>              
              
              <!--End Tab--> 
            </div>
          </div>
        </form>
        <!-- END SAMPLE FORM PORTLET--> 
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
jQuery(document).ready(function() {    
  App.init();
});

function chkfrm(){
	if($("#_goods_name").prop("value")==""){
		swal("请填写商品名称");
		return false;
	}
	
	
	if($("#market_price").prop("value")==""){
    swal("请填写市场价格");
    return false;
  }

  if($("#price_2").prop("value")==""){
    alert("请填写县代价格");
    return false;
  }

  if($("#price_3").prop("value")==""){
    alert("请填写市代价格");
    return false;
  }

  if($("#price_4").prop("value")==""){
    swal("请填写省代价格");
    $("#_two_price").focus();
    return false;
  }

  if($("#recommend_2").prop("value")==""){
    alert("请填写县代级别推荐奖");
    return false;
  }

  if($("#recommend_3").prop("value")==""){
    alert("请填写市代级别推荐奖");
    return false;
  }

  if($("#recommend_4").prop("value")==""){
    swal("请填写省代级别推荐奖");
    $("#_two_price").focus();
    return false;
  }
	
}
</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>